package com.dragon.mmochat.message;

import com.dragon.mmochat.MmochatConstant;
import com.dragon.mmochat.model.role.MmochatPlayer;
import com.skymobi.buffer.SkymobiBuffer;
import com.skymobi.message.SkymobiModuleMessage;

public class Mmochat_SendHonorChenHaoToOldServer extends SkymobiModuleMessage {
	int roleId;
	int addHonor;
	int index;

	public Mmochat_SendHonorChenHaoToOldServer() {
		setMsgCode(MmochatConstant.MSGCODE_MMOCHAT_SEND_HONOR_CHENHAO_TO_OLDSERVER);
	}

	public Mmochat_SendHonorChenHaoToOldServer(int dstId) {
		setDstId(dstId);
		setMsgCode(MmochatConstant.MSGCODE_MMOCHAT_SEND_HONOR_CHENHAO_TO_OLDSERVER);
	}

	@Override
	protected void decodeBody(SkymobiBuffer in) {
		roleId = MmochatPlayer.getRealRoleId(in.getInt());
		addHonor = in.getInt();
		index = in.getInt();
	}

	@Override
	protected void encodeBody(SkymobiBuffer out) {
		out.putInt(roleId);
		out.putInt(addHonor);
		out.putInt(index);
	}

	public int getRoleId() {
		return roleId;
	}

	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}

	public int getAddHonor() {
		return addHonor;
	}

	public void setAddHonor(int addHonor) {
		this.addHonor = addHonor;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

}
